Skip to content

feat(delivery): add estate vocabulary for locations, environments, deployments and provisions - #719

Merged
dmealing merged 7 commits into
mainfrom
fm/mo-140-w3-d1
Dec 6, 2026
Merged

dmealing merged 7 commits into
mainfrom
fm/mo-140-w3-d1

Conversation

@dmealing

@dmealing dmealing commented Dec 6, 2026 •

Copy link
Copy Markdown
Member

What Changed

  • Adds estate vocabulary to the delivery pack (TypeScript): location.jurisdiction (ISO country codes) holding location.region holding location.zone; environment.stage with @owner, @purpose and @lifespan; deployment.system and deployment.app with @locations and @mode; and provision.resource with @locations, @replication and @consistency. Deployment and provision nodes name no platform, product or size; those are settings keyed by node name.
  • Retires environment.standing, environment.ephemeral, environment.local and the platform attributes of deployment.base. The railway and cloudflare packs declare those attributes on their own deployment subtypes, so their output is unchanged. build.* and runtime.process stay with the app; value.* stays under platform deployments.
  • Updates the metamodel, expected-vocabulary pin, and conformance fixtures: a new delivery-estate-quillhaven load fixture and error fixtures for estate closed values, missing required fields, refs, nested jurisdictions and retired estate words. Adds a railway fixture for an app deployment beside a platform deployment. Adds a changelog fragment and reorders the 1.4.0 roadmap so deploy packs and API metadata come before the UI slice.
Validation

Risk Assessment

✅ Low: Fixture-only plus roadmap prose: the new fixture follows the sibling railway fixtures' canonical forms, and the roadmap edits apply the recorded decision (FR-021 and FR-024 named and retargeted to 1.4).

Testing

Drove the TypeScript loader against the delivery pack's synthetic fixtures through the pack conformance runner, live, with the output saved. The Quillhaven estate loads. The retired words, nested jurisdiction, missing-required and closed-value cases fail with their expected error codes. Railway and Cloudflare packs load unchanged, including the app-beside-platform duplicate case. The vocabulary pin holds. The roadmap reorder is docs only, so no runtime scenario applies. Overall: pass. Log at evidence dir pack-load-and-vocabulary.log. No background processes started, and the worktree is clean.

  • Live validation: ✅ go - 3 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Quillhaven estate (locations, environments, deployment.app/system, provision.resource) loads through the delivery pack's TS loader with expected vocabulary (synthetic fixture) ✅ pass live pack-load-and-vocabulary.log: delivery conformance 11 pass
Retired estate words and nested jurisdiction are rejected with expected error codes (adversarial) ✅ pass live pack-load-and-vocabulary.log: error-retired-estate-words, error-jurisdiction-nested, error-estate-missing-required, error-estate-closed-values, error-estate-refs all pass under delivery 11 pass
Railway and Cloudflare packs keep loading after the platform attributes moved to their own subtypes, including the app-beside-platform no-duplicate case ✅ pass live pack-load-and-vocabulary.log: railway 13 pass, cloudflare 9 pass
Roadmap 1.4.0 reorder (deploy and API before UI) ⏸️ untested no Documentation-only change with no runtime behavior; no live surface to drive. Review round 1 left the FR-021/FR-024 naming open as ask-user.
Evidence: Pack load conformance and vocabulary pin run log
pack delivery: conformance 11 pass
pack railway: conformance 13 pass
pack cloudflare: conformance 9 pass
pack delivery: vocabulary pinned, leaves core alone

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅

♻️ Reviewed only the branch's changes since run 01M95QNF2V5MQDQNYR65937HSC approved; the rest of the branch carries that approval.

Findings carried from run 01M95QNF2V5MQDQNYR65937HSC, already decided there:

  • ⚠️ packs/delivery/typescript/src/index.ts:79 - checkDeploymentUnique builds its candidate set from every non-abstract deployment.* at the root, so the set now includes the new deployment.app nodes, which carry @app and @Environment. deploymentTarget resolves them like platform deployments. Concrete case: an estate declares deployment.app "api-prod" (@app Shop.api, @Environment Production) and, later in load order, deployment.railway "api-railway" for the same pair during the migration. The Railway node then fails with ERR_DELIVERY_DUPLICATE_DEPLOYMENT, but neither placement is a duplicate platform deployment. This contradicts the updated contract in three places: ERROR-CODES.json:6 ("Two platform deployments (deployment.<platform>)"), constants.ts (the ERR_DELIVERY_DUPLICATE_DEPLOYMENT doc) and README.md Uniqueness ("Where a deployment.app overlaps a deployment.system is a placement rule, not a load error"). Fix: exclude subtypes DEPLOYMENT_SUBTYPE_SYSTEM and DEPLOYMENT_SUBTYPE_APP from the filter at index.ts:79, so only platform deployments are compared.

  • ℹ️ packs/railway/CHANGELOG.md:7 - Fixed the agreement in the new entry. It said "deployment.railway declare ... their value.* children themselves"; it now says "declares ... its value.* children itself".

  • ℹ️ packs/delivery/typescript/src/index.ts:81 - The round-1 fix (exclude deployment.system and deployment.app from the ERR_DELIVERY_DUPLICATE_DEPLOYMENT candidate set) is correct and matches ERROR-CODES.json and the constants doc. It has no regression fixture. Deleting the two subtype exclusions leaves every existing fixture green: error-duplicate-deployment covers only two platform deployments. Add a non-error railway or cloudflare fixture where a deployment.app and a deployment.railway target the same (@app, @Environment), and assert it loads. A plain rejection test would not catch the regression.

  • ℹ️ spec/roadmap.md:695 - The new 1.4.0 ordering prose says "the API metadata first" but names no FR, and the 1.4 section lists no item for it. The FR table still targets FR-021 ("api metadata + contract projections") at 1.3 (spec/roadmap.md:143). FR-024 records its declared-API port work as "later 1.3.0 work" (spec/roadmap.md:150). A reader cannot tell which work item is moved ahead of the UI slice in 1.4.0, or whether the FR-021 target is now stale. Remedy: name the FR (FR-021 and/or the FR-024 declared-API ports) in the prose, and align the FR table target if FR-021 now lands in 1.4. Choosing the FR and its target release is a planning decision, so it is left to the user.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 3 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Quillhaven estate (locations, environments, deployment.app/system, provision.resource) loads through the delivery pack's TS loader with expected vocabulary (synthetic fixture) ✅ pass live pack-load-and-vocabulary.log: delivery conformance 11 pass
Retired estate words and nested jurisdiction are rejected with expected error codes (adversarial) ✅ pass live pack-load-and-vocabulary.log: error-retired-estate-words, error-jurisdiction-nested, error-estate-missing-required, error-estate-closed-values, error-estate-refs all pass under delivery 11 pass
Railway and Cloudflare packs keep loading after the platform attributes moved to their own subtypes, including the app-beside-platform no-duplicate case ✅ pass live pack-load-and-vocabulary.log: railway 13 pass, cloudflare 9 pass
Roadmap 1.4.0 reorder (deploy and API before UI) ⏸️ untested no Documentation-only change with no runtime behavior; no live surface to drive. Review round 1 left the FR-021/FR-024 naming open as ask-user.
  • scripts/ci-local.sh --affected --strict-toolchains
  • bun scripts/pack-conformance.ts delivery (11 pass; includes delivery-estate-quillhaven load, error-retired-estate-words, error-jurisdiction-nested, error-estate-refs, error-estate-closed-values, error-estate-missing-required)
  • bun scripts/pack-conformance.ts railway (13 pass; includes railway-app-deployment-beside-platform as the regression for the app-vs-platform duplicate exclusion)
  • bun scripts/pack-conformance.ts cloudflare (9 pass)
  • bun scripts/pack-vocabulary.ts delivery (pin matches, leaves core alone)
  • Baseline: scripts/ci-local.sh --affected --strict-toolchains passed at target commit (not re-run)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…ments and provisions

The delivery pack registers the words that say where systems and apps run
(ADR-0070, calls 3 to 6): location.jurisdiction (@countries) holding
location.region and location.zone, flat; environment.stage (@owner,
@purpose, @Lifespan); deployment.system and deployment.app (@Locations,
@mode); provision.resource (@Locations, @replication, @consistency).
References use the reference facet and raise ERR_DELIVERY_UNRESOLVED_REF.

Retires environment.standing/.ephemeral/.local and deployment.base's
platform attributes and value children; the railway and cloudflare packs
declare those on their own deployment subtypes until they move. Builds and
runtime.process stay; value.* stays only under platform deployments.

New fixtures: delivery-estate-quillhaven and five error cases.
…app and environment loads

Regression fixture for the duplicate-deployment check: only platform
deployments are compared, so a deployment.app placing the same app in the
same environment as a deployment.railway is not a duplicate.
@dmealing
dmealing merged commit 5f9f16d into main Dec 6, 2026
11 checks passed
@dmealing
dmealing deleted the fm/mo-140-w3-d1 branch December 6, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant